﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Chbl.Models;

namespace Chbl.ViewModels
{
    public class TeamStandingViewModel
    {
        public TeamStandingViewModel OverallTeamStanding { get; set; }
        public Team Team { get; set; }
        public int WonGames { get; set; }
        public int LostGames { get; set; }
        public int Place { get; set; }
        public int TechnicalDefeats { get; set; }
        public string BallsDifference
        {
            get { return string.Format("{0}-{1}", BallsScored, BallsSkipped); }
        }
        public int BallsScored { get; set; }
        public int BallsSkipped { get; set; }
        public double BallsFactor
        {
            get { return Math.Round((double)BallsScored / BallsSkipped, 4); }
        }
        public int Points
        {
            get { return WonGames * 2 + LostGames - TechnicalDefeats; }
        }
    }
}